﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TimeTableCreatorOO
{
    public class StateShift : IState
    {
        private RowCleaner _cleaner;

        public StateShift(RowCleaner cleaner)
        {
            this._cleaner = cleaner;
        }

        #region IState Members

        public void GotoNextTurn(string content)
        {
            InputContent loadedInfo = _cleaner.GetContentType(content);

            switch (loadedInfo)
            {
                case InputContent.Number:
                    _cleaner.State = _cleaner.GetStateRead();
                    break;
                default:
                    throw new Exception("非法字符!");
                    break;
            }
        }

        #endregion
    }
}
